package com.danger.Presenter;

import android.content.Context;

import com.danger.Model.action.ObjectInfoDetailModel;
import com.danger.Model.action.ObjectInfoDetailModelImpl;
import com.danger.View.ObjectDetailView;

/**
 * Created by danger on 2016/4/4.
 */
public class ObjectInfoDetailPresenterImpl implements ObjectInfoDetailPresenter {

    private Context context;
    private ObjectInfoDetailModel objectInfoDetailModel;
    private ObjectDetailView objectDetailView;

    public ObjectInfoDetailPresenterImpl(Context context, ObjectDetailView objectDetailView) {
        this.context = context;
        this.objectDetailView = objectDetailView;
        objectInfoDetailModel = new ObjectInfoDetailModelImpl(context);
    }

    @Override
    public void share() {
        String content = objectDetailView.getShareContent();
        String url = objectDetailView.getShareImageUrl();
        objectDetailView.showSuccess("分享", null);
        objectInfoDetailModel.shareObjectInfo(content, url);
    }
}
